package com.athuahua.spzx.feignapi;

import com.athuahua.spzx.entity.UserAddress;
import com.athuahua.spzx.utils.Result;
import com.athuahua.spzx.vo.h5.UserInfoVo;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @Author: huahua
 * @Date: 2024/8/19 0019
 * @Time: 15:43
 * @Description:
 */
@FeignClient(value = "service-user")
public interface UserFeignClient {

    /**
     * 获取当前用户信息
     * @return
     */
    @GetMapping("api/user/userInfo/auth/getCurrentUserInfo")
    public Result<UserInfoVo> getCurrentUserInfo();


    /**
     * 获取用户地址信息
     * @param id
     * @return
     */
    @GetMapping("api/user/userAddress/getUserAddress/{id}")
    public UserAddress getUserAddress(@PathVariable("id") Long id);


    /**
     * 保存用户浏览历史
     * @param skuId
     * @return
     */
    @GetMapping("api/user/userInfo/auth/saveUserBrowseHistory/{skuId}")
    public Result saveUserBrowseHistory(@PathVariable("skuId") Long skuId);
}
